package com.example.sql.manager.utils;

import com.example.sql.manager.constants.Str;
import com.example.sql.manager.entity.po.BasePO;

public class InsertUtils {

    public static void fillObj(BasePO basePO) {
        basePO.setEnabled(1);
        basePO.setVersion(1L);

        //19700101235959
        TimeUtil timeUtil = new TimeUtil();
        String pattern = StringUtils.concat(Str.SMALL_YYYY, Str.BIG_MM, Str.SMALL_DD, Str.BIG_HH, Str.SMALL_MM, Str.SMALL_SS);
        String stampToDate = timeUtil.stampToDate(pattern, System.currentTimeMillis());

        basePO.setCreateDate(Long.valueOf(stampToDate));
        basePO.setLastModifyDate(Long.valueOf(stampToDate));
    }
}
